package utils
{
	import flash.display.BitmapData;
	import flash.geom.Rectangle;

	public class BitmapDataUtils
	{
		/**
		 * 获取彩色非透明区域 
		 * @param bd
		 * @return 
		 * 
		 */		
		public static function getColorRect( bd:BitmapData ):Rectangle
		{
			var rect:Rectangle = bd.getColorBoundsRect( 0xff000000, 0, false );
			if( rect.width==0 || rect.height==0 )
			{
				rect.width = bd.width;
				rect.height = bd.height;
			}
			return rect;
		}
		
		public function BitmapDataUtils()
		{
		}
	}
}